home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
d
/
digitalsoundsamv3.0d1.dms
/
digitalsoundsamv3.0d1.adf
/
c
/
Sound.doc
< prev
Wrap
Text File
|
1996-02-03
|
6KB
|
133 lines
***************************** Sound.doc ********************************
Sound is copyright (c) 1988 by Richard Lee Stockton, 21305 60th Ave W.,
Mountlake Terrace, Washington 98043, 206/776-1253(voice), but may be freely
distributed as long as no profit is made from its distribution or sale
without my written permission. I call this concept 'FreeWare', you can
call it whatcha want.
(INCLUDED ON PERFECT SOUND WITH PERMISSION FROM THE AUTHOR)
I also include the source code, (Manx 3.4/3.6), in the hope that it
will be of benefit to someone in the Amiga programming community. Feel
free to alter it at will, (but at your own risk!). I _would_ appreciate
receiving a copy of whatever it may become, and it is always nice to be
credited, (perhaps just a few lines of glowing tribute.^).
Long Live Leo and All the Little Schwabie's!
--------------------------------------------------------------------------
******** DESCRIPTION ********
Sound will attempt to feed <SOUNDfilename>'s data to the audio device.
It will 'sound' files containing ANY kind of data, (try 'Sound Sound' :-)
and of ANY length. If you have expansion memory, 'Sound' will store data
in FAST ram, and use only 4-5 k. of CHIP ram to actually sound the data.
This is the magic of 'double-buffering'.
If the STEREO flag is turned ON,the data will be split and played in
stereo. Otherwise, identical data is sent to left and right channels
unless limited by the LEFT or RIGHT flags. (You MUST use a L or R flag
if you only want this sound to use only 1 Amiga audio channel).
Perfect Sound (tm) samples in stereo will automatically sound in stereo.
These are the only stereo samples I've seen, so I don't know if the code
used is universal (in IFF) for STEREO.
If called from workbench, (by doubleclicking on a project icon), Sound
will search the 'ToolTypes' entries in the project icon for 'STEREO',
'CHANNEL', 'CYCLES', and 'SAMPLES_PER_SECOND'. If found, these values will
override any IFF values read from the SOUNDfile.
If called from CLI, over-riding values for STEREO, CHANNEL, CYCLES,
and/or SAMPLES_PER_SECOND may be specified in the command line. (See below)
If no settings for STEREO, CYCLES, CHANNEL, and/or SAMPLES_PER_SECOND
are found, in the file itself or in the calling arguments, STEREO defaults
to OFF, CYCLES to 1, left and right both on, and SAMPLES_PER_SECOND to 10000.
--------------------------------------------------------------------------
***** ABORT! *****
!!! Sound may be aborted by typing <CTRL> 'c' from the keyboard. !!!
If <CTRL> 'c' does NOT abort the sound, click on the Sound 'Status'
line, (the top line), then <CTRL> 'c' again.
--------------------------------------------------------------------------
*********** USAGE ************
NOTE!!! 'Sound' should be in your 'c' directory, (ie, 'copy Sound c:'),
before the following USAGEs will work!
USAGE: (from CLI)
Sound <filename> [CHANNEL] [STEREO] [CYCLES] [SAMPLES_PER_SECOND] [QUIET]
The filename MUST be the first argument, then the other arguments
may be in any order, or missing. (see below for valid values). Sound
alone will display a USAGE message. Sound will 'sound' the file, then
display the SAMPLES_PER_SECOND (if the file was found) and STEREO if
the sample was played in stereo.
There is one additional command when called form CLI (or a scriptfile)
QUIET or just q will disable the StatusLine that usually appears on the
top line.
(SAMPLES_PER_SECOND=10000 probably means it wasn't an IFF sound file.)
Although maximum CYCLES = 65535, from CLI the maximum is 55.
USAGE: (from WorkBench)
Double-'Click' on project icon whose Default Tool is set to 'c:Sound'.
ToolTypes: STEREO= CYCLES= SAMPLES_PER_SECOND=
CHANNEL= SOURCE= AUTHOR=
Valid Values: (these values stored in the .info file)
STEREO ON - OFF default=off. Not case sensitive.
File is split left/right.
CYCLES 0 - 65535 0 = sound loops until aborted.
Use Abort Button to stop.
SAMPLES_PER_SECOND 1000 - 65535 greater than 30000 seems to have
no effect, but MAX = 64k.
CHANNEL RIGHT or LEFT (r or l) Useful for effects.
SOURCE any text Where did this sound come from?
AUTHOR any text Immortality, if ya want it...
--------------------------------------------------------------------------
******** ARGUMENT PRIORITIES *******
Arguments from CLI or in the WorkBench Icon override any IFF info.
IFF file info overrides the default values.
Defaults: STEREO = off, CYCLES = 1, both CHANNELS,
SAMPLES_PER_SECOND = 10000
--------------------------------------------------------------------------
********* REVISIONS *********
MAY 1988 - Initial release.
DEC 1988 - Added multiple icon select, double buffering, QUIET flag.
DEC 1989 - Now shows soundfile name in status bar.
No longer crashes if all 4 audio channels are already in use.
--------------------------------------------------------------------------
******* OTHER STUFF *******
Included in this arc file are a sample project icon and its related
data file (Sneeze.info and Sneeze) as well as Sound, Sound.c, & this file.
Feel free to design your own icons, any project icon should work. Just
make the Default Tool in the icon 'c:Sound'.
Please try to keep all these files together when distributing as
every little bit may be of help!
Stay Warm & Enjoy! - Richard
***************************** Sound.doc **********************************